﻿Namespace FTTK.Entities.Rest
    <Serializable()>
    Public NotInheritable Class SearchAges

        Private Sub New()

        End Sub

        Public Shared Function FromEntityAge(order As Entities.SearchResultsAge) As String
            Select Case order
                Case Entities.SearchResultsAge.OneMonth
                    Return SearchAges.OneMonth
                Case Entities.SearchResultsAge.OneWeek
                    Return SearchAges.OneWeek
                Case Entities.SearchResultsAge.OneYear
                    Return SearchAges.OneYear
                Case Entities.SearchResultsAge.SixMonths
                    Return SearchAges.SixMonths
                Case Entities.SearchResultsAge.TwoYears
                    Return SearchAges.TwoYears
                Case Else
                    Return SearchAges.All
            End Select
        End Function

        Public Shared ReadOnly Property OneWeek As String
            Get
                Return "1w"
            End Get
        End Property

        Public Shared ReadOnly Property OneMonth As String
            Get
                Return "1m"
            End Get
        End Property

        Public Shared ReadOnly Property SixMonths As String
            Get
                Return "6m"
            End Get
        End Property

        Public Shared ReadOnly Property OneYear As String
            Get
                Return "1y"
            End Get
        End Property

        Public Shared ReadOnly Property TwoYears As String
            Get
                Return "2y"
            End Get
        End Property

        Public Shared ReadOnly Property All As String
            Get
                Return "all"
            End Get
        End Property

    End Class
End Namespace